/*
 * @Author: Villlee 15388605742@163.com
 * @Date: 2025-08-19 00:02:00
 * @LastEditors: Villlee 15388605742@163.com
 * @LastEditTime: 2025-08-26 22:21:35
 * @FilePath: /node-react-vite/midway-project/src/config/config.local.ts
 * @Description: 本地开发环境配置
 *
 * Copyright (c) 2025 by ${git_name_email}, All Rights Reserved.
 */
import { MidwayConfig } from '@midwayjs/core';

export default {
  koa: {
    port: 7001,
  },
  development: {
    watchDirs: ['app', 'lib', 'config', 'controller', 'middleware', 'service'],
    ignoreDirs: ['app/public', 'app/views'],
  },
  // 本地开发环境数据库配置
  // 请根据你的实际情况修改以下配置
  typeorm: {
    dataSource: {
      default: {
        type: 'mysql',
        host: '127.0.0.1',
        port: 3306,
        username: 'root',
        password: 'root', // 修改为你的MySQL密码
        database: 'midway_user',
        synchronize: true, // 仅在开发环境中使用
        logging: false,
        entities: ['**/entity/*.ts'],
        timezone: '+08:00',
      },
    },
  },
} as MidwayConfig;
